<include file="Public/newset-header" title="发布应用" />
<style type="text/css">
    .header{padding: 36px 0 0 0;width: 1170px;}
    #container{ width: 100%; margin: 0 auto; height: 630px;}
    .btn-u {background: #56bc94;}
    .qq-upload-button-selector { margin-top: 220px;}
    ul{ list-style: none;}
    .container{text-align: center;}
    .container h1{width: 150px;float: left;}
    .biaoti p{width: 150px;float: right;line-height: 62px;margin: 0;text-align: right;padding-right: 15px;}
    .residue{width: 170px;border-radius: 6px;background: #F9F9F9;height: 62px;float: left;padding: 10px 40px;position: relative;}
    .residue a{color: #22c485;text-decoration: none;}
    .residue span{display: block;position: absolute;width: 10px;height: 10px;border-radius: 50%;background: #22c485;top:28px;left: 25px;}
    .combo-tilte{width:100%;height:200px;background-image:url(__STATIC__/img/title-bg_03.jpg);margin: auto;background-position: center top;background-repeat: no-repeat;background-size: 600px 200px;margin-bottom: 80px;}
    .combo-tilte h2{font-size: 30px;font-weight: 500;padding-top: 90px;}
    .combo-tilte h2,.combo-tilte p{color: #2fc387;}
    .combo-tilte p{font-size: 20px;}
    .charge{position: relative;width: 100%;height: 400px;z-index: 9;}
    .charge h3,.charge h5,.charge a,.charge p,.charge span{color: #FFFFFF;text-decoration: none;}
    .charge h5{margin-top:0;line-height: 30px;}
    .charge p{margin-bottom: 30px;}
    .charge h3{line-height: 60px;border-bottom: 1px solid #ffffff;margin-bottom: 30px;}
    .charge li{width: 310px;position: absolute;padding:0  30px;box-shadow: 0px 0px 15px 5px rgba(0,0,0,.2);border-radius: 10px;}
    .yellow{background: #ff9630;}
    .yellow a:hover{background: #FFFFFF;color: #ff9630;}
    .green{background: #58c287;}
    .green a:hover{background: #FFFFFF;color: #58c287;}
    .red{background: #ff3b30;}
    .red a:hover{background: #FFFFFF;color: #ff3b30;}
    .blue{background: #3680c4;}
    .blue a:hover{background: #FFFFFF;color: #3680c4;}
    .charge a{display: block;width: 200px;height: 50px;line-height: 50px;text-align: center;margin: auto;border: 1px solid #FFFFFF;border-radius: 4px;margin-bottom: 30px;}
    .charge i{font-size: 60px;font-style: normal;line-height: 65px;}
    .charge div{width: 120px;height: 30px;margin: auto;line-height: 30px;}
    .charge div span{display: block;background: #FFFFFF;width: 120px;height: 30px;color: #58C287;border-radius: 5px;}
    .coverage{z-index: 99;top: -20px;padding-top: 30px;}
    .coverage a{margin-bottom: 70px;}
    .frequency{margin: auto;overflow: auto;width: 820px;padding: 0;text-align: left;}
    .frequency li{width: 350px;float: left;}
    .frequency li p{margin: 0;line-height: 30px;}
    .across{margin: 80px;}
    .select-bg{position: fixed;width:100%;height: 100%;background: rgba(0,0,0,.4);z-index: 99999;left: 0;top: 0;display:none;}
    .select-bg .select-buy{position:absolute;width:805px;margin: auto;top:30%;left:0;right:0;background: #fff;padding: 27px 25px;display: none;}
    .select-bg .select-buy li{width: 207px;border:1px solid #e6e9f0;float: left;padding: 10px 25px;margin: 0 22px;}
    .select-buy li a{display:block;text-align: center;width: 100%;line-height:24px;background: #fff;border-radius: 18px;margin-top: 10px;text-decoration: none;}
    .select-buy li img{display:block;margin:auto;}
    .select-close{display: block;width:30px;height:30px;line-height:30px;text-align:center;position: absolute;top: 0;right:10px;font-size: 18px;}
    .weixin{background: #00c901;}
    .weixin a{color:#00c901;}
    .zhifubao{background: #0aaaf0;}
    .zhifubao a{color: #0aaaf0;}
    .yu-e{background: #f8736e;}
    .yu-e a{color: #f8736e;}
    .buy-accomplish{position: absolute;margin: auto;top:30%;left:0;right:0;background:#fff;width:500px;display: none;}
    .buy-accomplish .buy-close{display: block;width:30px;height:30px;line-height:30px;text-align:center;position: absolute;top: 0;right:10px;font-size: 18px;color: #828282;}
    .accomplish{padding: 50px 60px 0 60px;margin-bottom: 30px;}
    .accomplish .accomplish-left{float: left;font-size: 60px;color: #268df7;}
    .accomplish .accomplish-right{float: left;margin-left: 40px;}
    .accomplish .accomplish-right h3{line-height: 45px;}
    .accomplish-bot{height: 50px;background: #f4f4f4;}
    .accomplish-bot a{display: block;width:160px;float:right; height:50px;line-height: 50px;color: #fff;background: #268df7;text-align: center;text-decoration: none;}
    .accomplish-bot a:hover{color:#fff;}
    @media(max-width:1200px){
    .header{width: 100%;}
    .charge{height: auto;}
    .charge li{position: static;margin: auto;}
    .across{margin: 30px;}
    .frequency{width: 100%;}
    .frequency li{width: 100%;margin: 10px 0!important;}
    .frequency li p{text-align: center;}
    }
    @media (max-height: 900px){
        #container{ height: 450px;}
        .qq-upload-button-selector { margin-top: 150px;}

    }
    @media (max-width:900px){
        .select-bg .select-buy{width: 100%;}
        .select-bg .select-buy li{float: none;margin: auto;}
        .select-bg .select-buy li img{display: none;}
        .buy-accomplish{width: 100%;}
    }
    @media (max-height: 720px){
        #container{ height: 330px;}
        .qq-upload-button-selector { margin-top: 100px;}
    }
    @media (max-width:768px){
        .select-bg .select-buy li{float: none;margin: 10px auto;}
        .buy-accomplish{width: 100%;padding-top: 30px;}
        .select-buy li a{margin: 0;}
        .accomplish{padding: 30px 10px 0 10px;}
    }
    @media (max-width:363px){
        .accomplish-left{display:none;}
    }
</style>
<link rel="stylesheet" type="text/css" href="__STATIC__/css/add.css">
<div class="select-bg">
    <!-- 选择支付方式 -->
    <form action="" id="paytaocan" method="post" target="_blank">
        <input type="hidden" name="buymoney" id="buymoney" value="">
        <input type="hidden" name="paytype" id="paytype" value="">
        <input type="hidden" name="userid" value="{$result.id}">
   <ul class="select-buy">
       <a href="javascript:;" class="select-close" ><i class="fa fa-close"></i></a>
       <li class="weixin">
        <!-- <img src="__STATIC__/img/weixinQRCODE.png" alt="" height="120" width="120">
         <a href="#" class="pay-btnnew" value="3"  >微信支付</a>-->
        <img src="__STATIC__/img/weixin.png" alt="" height="120" width="120">
          <a href="#" class="pay-btn" value="2"  >微信支付</a>
       </li>
       <li class="zhifubao">

            <!--<img src="__STATIC__/img/zhifubaoQRCODE.png" alt="" height="120" width="120">
            <a href="#" class="pay-btnnew" value="2"  >支付宝支付</a>-->
           <img src="__STATIC__/img/zhifubao.png" alt="" height="120" width="120">
           <a href="#" class="pay-btn" value="1"  >支付宝支付</a>
       </li>
       <li class="yu-e">
        <img src="__STATIC__/images/yu-e.png" alt="" height="120" width="120">
        <a href="#" class="pay-btn" value="3"  >余额支付</a>
    </li>
       <div class="clear"></div>
   </ul>
    </form>
   <!-- 支付完成提示框 -->
   <div class="buy-accomplish">
        <a href="javascript:;" class="buy-close" ><i class="fa fa-close"></i></a>
        <div class="accomplish">
            <div class="accomplish-left">
                  <i class="fa fa-warning"></i>
            </div>
            <div class="accomplish-right">
                 <h3>请在新窗口完成支付!</h3>
                 <p>请根据您的支付情况完成一下操作.</p>
            </div>
            <div class="clear"></div>
        </div>
        <div class="accomplish-bot">
            <a href="">完成支付</a>
        </div>
   </div>
</div>

<div class="container content recent" style="padding: 0;margin-top:40px;">
     <div class="combo-tilte">
     	<h2>总有一款适合你</h2>
     	<p>根据app文件大小收取费用,帐号下所有app共用次数,不限制使用时间,凡付费帐号,均无广告.</p>
     </div>
     <!--收费-->
     <ul class="charge">

         <foreach name="data" item="v" key="k">
             <li {$v.class}>
             <h3>{$v.remarks}</h3>
             <h5>{$v.downum}次下载</h5>
                 <if condition="$v.giftsnum neq '0'">
                     <div><span>赠送{$v.giftsnum}次下载</span></div>
                 </if>
             <div></div>
             <p>￥<i>{$v.price|substr=0,6}</i></p>
             <a href="javascript:;" name="buy" value="{$v.id}" class="buy-btn" >立即购买</a>
             <!--<a href="javascript:;" name="buy" value="{$v.price}" class="buy-btn" >立即购买</a>-->
             </li>
         </foreach>
         <div class="clear"></div>
     </ul>
     <input type='hidden' id="productType">
     <!--标准-->
     <div class="across">
     <h2>扣除次数说明</h2>
     <ul class="frequency">
     	<li style="margin-right: 120px;">
     		<p>安装包 ≥ 0MB ≤ 100MB  扣除下载次数1</p>
     		<p>安装包 > 300MB ≤ 600MB  扣除下载次数6</p>
     		<p>安装包 > 1000MB ≤ 1500MB  扣除下载次数15</p>
     	</li>
     	<li>
     		<p>安装包 > 100MB ≤ 300MB  扣除下载次数3</p>
     		<p>安装包 > 600MB ≤ 1000MB  扣除下载次数10</p>
     		<p>安装包 > 600MB ≤ 1000MB  扣除下载次数10</p>
     	</li>
     </ul>
        </div>
</div>
<form style='display:none;' id='formpay' name='formpay' method='post' action='https://pay.paysapi.com'>
    <input name='goodsname' id='goodsname' type='text' value='' />
    <input name='istype' id='istype' type='text' value='' />
    <input name='key' id='key' type='text' value=''/>
    <input name='notify_url' id='notify_url' type='text' value=''/>
    <input name='orderid' id='orderid' type='text' value=''/>
    <input name='orderuid' id='orderuid' type='text' value=''/>
    <input name='price' id='price' type='text' value=''/>
    <input name='return_url' id='return_url' type='text' value=''/>
    <input name='uid' id='uid' type='text' value=''/>
    <input type='submit' id='submitdemo1'>
</form>

<script type="text/javascript" src="__STATIC__/js/plupload.full.min.js" ></script>
<script type="text/javascript" src="__STATIC__/js/qiniu.min.js" ></script>
<script type="text/javascript" src="__STATIC__/js/infozaq.js"></script>
<include file="Public/newset-footer" />
<script>
 function CreateData(pType,istype){

  $.ajax({
    url: '/index.php/Member/CreatePayData',
    type: 'post',
    dataType: 'json',
    data:{productType:pType,istype:istype},
    success: function(data) {
      if (data.code > 0){
          $("#goodsname").val(data.data.goodsname);
          $("#istype").val(data.data.istype);
          $('#key').val(data.data.key);
          $('#notify_url').val(data.data.notify_url);
          $('#orderid').val(data.data.orderid);
          $('#orderuid').val(data.data.orderuid);
          $('#price').val(data.data.price);
          $('#return_url').val(data.data.return_url);
          $('#uid').val(data.data.uid);
          $('#submitdemo1').click();

      } else {
          alert(data.msg);
      }
    },
    error:function(data){
    }
  });
};

    $(function(){

        $(".pay-btn").click(function(){
           var istype = $(this).attr("value");
            $("#paytype").val($(this).attr("value"));
           if(istype=="3"){
               $("#paytaocan").attr("action", "{:U('member/buydown')}");
               $("#paytaocan").submit();
           }
           else{
               CreateData($("#productType").val(),istype);
           }

        });

           $(".buy-btn").click(function(){
             $(".select-bg").fadeIn();
             $(".select-buy").fadeIn();
             $("#productType").val($(this).attr("value"));
           });

           $(".select-close").click(function(){
            $(".select-bg").fadeOut();
            $(".select-buy").fadeOut();
          });

           $(".pay-btn").click(function(){
               setTimeout(function() {
                $(".select-buy").fadeOut();
              //  $(".buy-accomplish").fadeIn();
               }, 1000);
           });

           $(".buy-close").click(function(){
               $(".buy-accomplish").fadeOut();
               $(".select-bg").fadeOut();
           });
    })
</script>
<script language="javascript">

    function gotopay(){
        var val = $('input:radio[name="paytype"]:checked').val();

        if(val=='1'){
            $("#paytaocan").attr("action", "{:U('member/buydown')}");
        }else if(val=='2'){
        <if condition="$ispc eq 1">
                $("#paytaocan").attr("action", "/alipaypc/pagepay/paytaocan.php");
            //$("#paytaocan").attr("action", "/alipay/wappay/paytaocan.php");
        <else/>
            $("#paytaocan").attr("action", "/alipay/wappay/paytaocan.php");
        </if>

        }else if(val=='3'){
        <if condition="$ispc eq 1">
                //$("#paytaocan").attr("action", "/jiupay/paytaocan.php");
                alert("请复制此链接到手机浏览器点击进行支付");
            return false;
        <else/>
            $("#paytaocan").attr("action", "/jiupay/paytaocan.php");
        </if>

        }
        //
        $('#paytaocan').submit();
    }
</script>
